<!--
 * @Author: dawei 664690250@qq.com
 * @Date: 2023-04-07 07:58:53
 * @LastEditors: dawei 664690250@qq.com
 * @LastEditTime: 2023-04-07 08:24:25
 * @FilePath: /hn-talent-ump-vue/src/components/gantt/components/TaskList/TaskListItem.vue
 * @Description: 请填写文件描述
 * 大佬别走，带带弟弟
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<!--
/**
 * @fileoverview TaskListItem component
 * @license MIT
 * @author Rafal Pospiech <neuronet.io@gmail.com>
 * @package GanttElastic
 */
-->
<template>
  <div class="gantt-elastic__task-list-item" :style="{ ...root.style['task-list-item'] }">
    <item-column v-for="column in columns" :key="column._id" :column="column" :task="task">
      <task-list-expander
        v-if="column.expander"
        :tasks="[task]"
        :options="root.state.options.taskList.expander"
        type="taskList"
      ></task-list-expander>
    </item-column>
  </div>
</template>
<script>
import TaskListExpander from '../Expander.vue'
import ItemColumn from './ItemColumn.vue'

export default {
  name: 'TaskListItem',
  components: {
    TaskListExpander,
    ItemColumn
  },
  inject: ['root'],
  props: ['task'],
  data() {
    return {}
  },
  computed: {
    columns() {
      return this.root.state.options.taskList.columns
    }
  }
}
</script>
